/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author HoangHai
 */
@Embeddable
public class ResultPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ClassID", nullable = false)
    private int classID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "SubID", nullable = false)
    private int subID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "SeID", nullable = false)
    private int seID;

    public ResultPK() {
    }

    public ResultPK(int classID, int subID, int seID) {
        this.classID = classID;
        this.subID = subID;
        this.seID = seID;
    }

    public int getClassID() {
        return classID;
    }

    public void setClassID(int classID) {
        this.classID = classID;
    }

    public int getSubID() {
        return subID;
    }

    public void setSubID(int subID) {
        this.subID = subID;
    }

    public int getSeID() {
        return seID;
    }

    public void setSeID(int seID) {
        this.seID = seID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) classID;
        hash += (int) subID;
        hash += (int) seID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ResultPK)) {
            return false;
        }
        ResultPK other = (ResultPK) object;
        if (this.classID != other.classID) {
            return false;
        }
        if (this.subID != other.subID) {
            return false;
        }
        if (this.seID != other.seID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ResultPK[ classID=" + classID + ", subID=" + subID + ", seID=" + seID + " ]";
    }
    
}
